import 'package:flutter/material.dart';
import 'package:shenlingwuliu_flutter/pages/task/finish.dart';
import 'package:shenlingwuliu_flutter/pages/task/route.dart';
import 'package:shenlingwuliu_flutter/pages/task/waiting.dart';

class TaskPage extends StatefulWidget {
  const TaskPage({super.key});

  @override
  State<TaskPage> createState() => _TaskPageState();
}

class _TaskPageState extends State<TaskPage> {
  @override
  void dispose() {
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return DefaultTabController(
      length: 3,
      child: Scaffold(
        appBar: AppBar(
          bottom: const TabBar(
            tabs: [
              Tab(text: '待提货'),
              Tab(text: '在途'),
              Tab(text: '已完成'),
            ],
            indicatorColor: Colors.red,
            labelStyle: TextStyle(
                fontWeight: FontWeight.bold,
                color: Colors.black), // 被选中的文字为加粗黑色
            unselectedLabelStyle:
                TextStyle(color: Color.fromRGBO(100, 99, 99, 1)), // 未被选中的文字颜色
            isScrollable: false,
          ),
        ),
        body: const TabBarView(
            children: [WaitingPage(), RoutePage(), FinishPage()]),
      ),
    );
  }
}
